package com.ischoolbar.programmer.service.home.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ischoolbar.programmer.dao.home.ShoppingDao;
import com.ischoolbar.programmer.entity.home.Shopping;
import com.ischoolbar.programmer.service.home.ShoppingService;

@Service
public class ShoppingServiceImpl implements ShoppingService{

	@Autowired
	private ShoppingDao shoppingDao;
	
	@Override
	public int add(Shopping shopping) {
		// TODO Auto-generated method stub
		return shoppingDao.add(shopping);
	}

	@Override
	public List<Shopping> findList(Map<String, Object> queryMap) {
		// TODO Auto-generated method stub
		return shoppingDao.findList(queryMap);
	}

	@Override
	public int getTotal(Map<String, Object> queryMap) {
		// TODO Auto-generated method stub
		return shoppingDao.getTotal(queryMap);
	}

	@Override
	public int delete(String id) {
		// TODO Auto-generated method stub
		return shoppingDao.delete(id);
	}

	@Override
	public Shopping findShoppingById(Map<String, Object> queryMap) {
		// TODO Auto-generated method stub
		return shoppingDao.findShoppingById(queryMap);
	}

	@Override
	public int editNum(Shopping shopping) {
		// TODO Auto-generated method stub
		return shoppingDao.editNum(shopping);
	}

	@Override
	public int editState(Shopping shopping) {
		// TODO Auto-generated method stub
		return shoppingDao.editState(shopping);
	}

	@Override
	public Shopping findByShoppingId(Long id) {
		// TODO Auto-generated method stub
		return shoppingDao.findByShoppingId(id);
	}

	@Override
	public int deleteByIds(String ids) {
		// TODO Auto-generated method stub
		return shoppingDao.deleteByIds(ids);
	}

	@Override
	public List<Shopping> findByIds(String shopping_Id) {
		// TODO Auto-generated method stub
		return shoppingDao.findByIds(shopping_Id);
	}

	@Override
	public int deleteByProductId(Long productId) {
		// TODO Auto-generated method stub
		return shoppingDao.deleteByProductId(productId);
	}

	@Override
	public int deleteByAccountId(Long accountId) {
		// TODO Auto-generated method stub
		return shoppingDao.deleteByAccountId(accountId);
	}

	
}
